﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
//Tsvetan Manev testing if commiting is set correct

namespace HomeBudget
{
    public abstract class Money // exactly what it says
    {
        private decimal amount;
        public decimal Amount
        {
            get
            {
                return this.amount;
            }
            private set
            {
                if (value <= 0)
                {
                    throw new ArgumentException("The amount of money has to be a positive number.");
                }
                else
                {
                    this.amount = value;
                }
                   
            }
        }

        public Money(decimal amount)
        {
            this.Amount = amount;
        }
    }
}
